package com.hdphone.zljutils.impl;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.telephony.TelephonyManager;

import com.hdphone.zljutils.annotation.PrivacyPolicy;

/**
 * @author sq
 * @date 2020/11/13
 * @describe
 */
public interface INetwork {


    @PrivacyPolicy
    boolean isAvailableByPing(String ip);

    /**
     * 获取本机ip
     * @return
     */
    @PrivacyPolicy
    String getIp();

    /**
     * wifi是否连接
     * @return
     */
    boolean isWifiConnected();

    /**
     * 获取wifi名称
     * @return
     */
    String getWifiName();

    /**
     * 判断网络是否已连接
     *
     * @param context
     * @return
     */
    boolean isNetworkConnected();

    /**
     * 获取当前网络连接的类型
     *
     * @param context context
     * @return int
     */
    int getNetworkState(Context context);

    String getNetworkStateString(Context context);

}
